package cn.chy.com.springbootdemo2.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.Date;

/**
 * @Description: TODO
 * @author: 颜景琦
 * @date: 2021年10月22日 12:29
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@TableName("department")
@ApiModel(value = "部门类",description = "部门描述")
public class Department {

    private int id;

    private String name;

    @Version
    private int version;

    @TableField(exist = false)
    private String temp;


    @TableField(value = "createdTime", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdTime;

    @TableField(value = "updatedTime", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updatedTime;


    @TableField(value = "deleted",fill = FieldFill.INSERT)
    @TableLogic
    private int deleted;
}
